package com.asset.troubleticket.domain;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;


@Entity
@Table(name="tt_authentication")
public class Authentication {
	
	private Integer id;
	private String userName;
	private String email;
	private String password;
	private boolean isLoggedIn;
	private Date lastLoginDate;
	private String info;
	private boolean flag;
	private Employee employeeId;
	
	@Id
 	@GeneratedValue(strategy = GenerationType.SEQUENCE ,generator="tt_authentication_id_seq")
	@SequenceGenerator(name = "tt_authentication_id_seq", sequenceName = "tt_authentication_id_seq", allocationSize = 1)

	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	@Column(name="user_name")
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	@Column(name="email")
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	@Column(name="password")
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	@Column(name="is_login_in")
	public boolean isIsLoginDate() {
		return isLoggedIn;
	}
	public void setIsLoginDate(boolean isLoggedIn) {
		this.isLoggedIn = isLoggedIn;
	}
	@Column(name="last_login_date")
	public Date getLastLoginDate() {
		return lastLoginDate;
	}
	public void setLastLoginDate(Date lastLoginDate) {
		this.lastLoginDate = lastLoginDate;
	}
	@Column(name="info")
	public String getInfo() {
		return info;
	}
	public void setInfo(String info) {
		this.info = info;
	}
	@Column(name="flag")
	public boolean isFlag() {
		return flag;
	}
	public void setFlag(boolean flag) {
		this.flag = flag;
	}
	@OneToOne
	@JoinColumn(name = "employee_id")
	public Employee getEmployee() {
		return employeeId;
	}
	public void setEmployee(Employee employee) {
		this.employeeId = employee;
	}
    	
}
